package com.jiangyg.mall.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 类描述：Oauth2客户端信息表
 *
 * @author jiangyg
 * @date 2022-01-06
 */
@Data
@NoArgsConstructor
@TableName("t_sys_oauth_client")
@EqualsAndHashCode(callSuper = true)
public class OauthClient extends BaseEntity {

    private static final long serialVersionUID = 4569864764856863332L;

    /**
     * 客户端ID
     */
    @TableId(value = "client_id", type = IdType.INPUT)
    private String clientId;

    /**
     * 资源ID
     */
    @TableField("resource_ids")
    private String resourceIds;

    /**
     * 客户端密码
     */
    @TableField("client_secret")
    private String clientSecret;

    /**
     * 范围
     */
    @TableField("scope")
    private String scope;

    /**
     * 授权类型
     */
    @TableField("grant_types")
    private String grantTypes;

    /**
     * 跳转地址
     */
    @TableField("redirect_uri")
    private String redirectUri;

    /**
     * 权限
     */
    @TableField("authorities")
    private String authorities;

    /**
     * 授权令牌失效
     */
    @TableField("access_token_validity")
    private Integer accessTokenValidity;

    /**
     * 刷新令牌失效
     */
    @TableField("refresh_token_validity")
    private Integer refreshTokenValidity;

    /**
     * 附加信息
     */
    @TableField("additional_information")
    private String additionalInformation;

    /**
     * 自动批准
     */
    @TableField("autoapprove")
    private String autoapprove;

}
